/**
 * 
 */
package com.india.metro.delhi;

import java.util.ArrayList;
import java.util.List;

import com.india.Route;
import com.india.StopNode;

/**
 * @author gautasa
 *
 */
public class DelhiMetroRouteFactoryImpl implements DelhiMetroRouteFactory {
	
	private Route yellowRoute;
	private Route blueRoute;
	private BlueBranchMetroRoute blueBranchRoute;
	private Route violetRoute;
	private Route redRoute;
	private Route airportExpressRoute;
	private Route greenRoute;
	public DelhiMetroRouteFactoryImpl(){
		yellowRoute = new YellowMetroRoute();
		blueRoute = new BlueMetroRoute();
		blueBranchRoute = new BlueBranchMetroRoute();
		violetRoute = new VioletMetroRoute();
		redRoute = new RedMetroRoute();
		airportExpressRoute = new AirportExpressRoute();
		greenRoute = new GreenMetroRoute();
	}
	
	/* (non-Javadoc)
	 * @see com.india.metro.delhi.DelhiMetroRouteFactory#getRoute(com.india.metro.delhi.DelhiMetroRouteCode)
	 */
	@Override
	public List<StopNode> getRoute(DelhiMetroRouteCode code){
		switch (code) {
		case YELLOW:
			return yellowRoute.getRouteNodes();
		case BLUE:
			return blueRoute.getRouteNodes();
		case BLUE_GZB:
			return blueBranchRoute.getGhaziabadBranchRoute();
		case VIOLET:
			return violetRoute.getRouteNodes();
		case RED:
			return redRoute.getRouteNodes();
		case AIRPORT:
			return airportExpressRoute.getRouteNodes();
		case GREEN:
			return greenRoute.getRouteNodes();
		default:
			return new ArrayList<StopNode>();
		}
	}
}
